package com.lamatek.tags.google.beans;

/**
 * Geocoder
 * @author Tom Cole
 * @version 0.40
 * 
 * Parent interface for all address based geocoders.
 */
public interface Geocoder {
    /**
     * Sets the street address of the location to geocode.
     * 
     * @param address A valid street address (i.e. 74 Connor Lane)
     */
    public abstract void setAddress(String address);
    /**
     * Sets the city name of the location to geocode.
     * 
     * @param city The US or Internation city name.
     */
    public abstract void setCity(String city);
    /**
     * Sets the state/province of the location to geocode.
     * 
     * @param state The US state or International province name.
     */
    public abstract void setState(String state);
    /**
     * Sets the ZIP or Postal code of the location to geocode.
     * 
     * @param zip The US ZIP or International postal code.
     */
    public abstract void setZip(String zip);
    /**
     * Sets the country code for the location to geocode.
     * 
     * @param country The ISO compliant 2-character country code.
     */
    public abstract void setCountry(String country);
    /**
     * Returns the longitude (in decimal form) of the location
     * geocoded.
     * 
     * @return The longitude (in decimal form) of the location as a double.
     */
    public abstract double getLongitude();
    /**
     * Returns the latitude (in decimal form) of the location
     * geocoded.
     * 
     * @return The latitude (in decimal form) of the location as a double.
     */
    public abstract double getLatitude();
    /**
     * Attempts to geocode the location based on the current information.
     * 
     * @return True if the geocoding was successful or false if it was not.
     */
    public abstract boolean geocode();
    /**
     * Returns any precision information provided by the underlying geocoder.
     * If none is present, or the coder does not support this feature, then
     * this method will return null.
     * 
     * @return Any precision information or null if none is available.
     */
    public abstract String getPrecision();
    /**
     * Returns any warnings given by the underlying geocoder.
     * 
     * @return Any warning information or null if none is available.
     */
    public abstract String getWarning();
}
